package com.example.test.启动线程.原子操作;

import cn.hutool.core.date.DateUtil;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

public class Main34 {

    private static int i = 0;

    public static void main(String[] args) {


        System.out.println(DateUtil.current());

        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(i++);
            }
        };

        for (int i1 = 0; i1 < 10; i1++) {
            new Thread(runnable).start();
        }


    }
}
